package com.magiccompass.alipay.barcode.util;

import com.google.gson.Gson;

import com.magiccompass.alipay.barcode.model.MerchantQRCodeModel;

public class SimpleJsonUtil {
	public static String getQRCodeValue(String jsonData){
		Gson gson = new Gson();
		MerchantQRCodeModel merchantQRCodeModel = gson.fromJson(jsonData, MerchantQRCodeModel.class);
		return merchantQRCodeModel.getQrcode();
	}
	
	public static void main(String[] args){
		String testData = "{\"qrcode\":\"https://qr.alipay.com/9446219319446735\"}";
		System.out.println(getQRCodeValue(testData));
	}
}
